import request from '@/utils/request'

export default {
  initShopUserInfo(){
    /** 获取用户详情 **/
    return request({
      url: '/shopUser/info',
      method: 'post',
    })
  },
  initAddressInfo(){
    /** 获取用户详情 **/
    let data ={}
    return request({
      url: '/shopUserAddress/data/list',
      method: 'post',
      data
    })
  },
  updateShopUserInfo(params){
    /** 个人信息更新 **/
    let data = params;
    return request({
      url: '/shopUser/data/updateById',
      method: 'post',
      data
    })
  },
  getAddressInfo(params){
    /** 获取地理位置信息 **/
    let data = {
      keywords: params.keywords,
      subdistrict: params.subdistrict
    }
    return request({
      url: '/shopUserAddress/infoByKey',
      method: 'post',
      data
    })
  },
  saveAddressInfo(params){
    let data = params;
    return request({
      url: '/shopUserAddress/save',
      method: 'post',
      data
    })
  },
  deleteAddressInfo(params){
    let data = params;
    return request({
      url: '/shopUserAddress/data/deleteByIds',
      method: 'post',
      data
    })
  }
}
